import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../views/access/index'
import admin from '../views/access/admin'
import userBatchImport from '../views/user/batchImport'
import courseGroupBatchImport from '../views/courseGroup/batchImport'
import login from '../views/access/login.vue'
import batchImportOne from "../views/course/batchImport"; // 批量导入
import course from '../views/course/course'
import notice from '../views/user/notice'
import major from "../views/major/major";//专业管理
import layoutAdmin from "../views/admin"
// import auditJoin from "../views/courseGroup/auditJoin";
import auditRegister from "../views/user/auditRegister";
import stulist from "../views/user/stulist";
import schoolLayout from "../views/shcool" // 校管理员登录界面布局
import collegeAdmin from "../views/school/collegeAdmin"; // 校管理员的院管理设置
import collegeManage from "../views/college/collegeManage.vue"; // 校管理员 学院管理
import coursegroup from "../views/courseGroup/coursegroup";
import teacherList from "../views/user/teacherList";
import classes from "../views/classes/classes";//班级管理
//老师列表

import loginSchool from '../views/access/loginSchool.vue'


Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'index',
        component: Index
    },
    {
        path: '/login', // 登录界面
        name: 'login',
        component: login
    },
    {
        path: '/logins', // 登录界面
        name: 'logins',
        component: loginSchool
    },
    {
        path: '/school', // 校管理员主界面
        name: 'school',
        component: schoolLayout,
        children:[
            {
                path: 'collegeAdmin',//管理员界面
                name: 'collegeAdmin',
                component: collegeAdmin

            },
            {
                path: 'college', // 学院管理
                name: 'college',
                component: collegeManage
            }
        ]
    },
    {
        path: '/admin', // 管理员主界面
        name: 'admin',
        component: layoutAdmin,
        children:[
            {
                path: 'index',//管理员界面
                name: 'adminIndex',
                component: admin
            },
            {
                path: 'user/batchImport', // 批量导入
                name: 'userBatchImport',
                component: userBatchImport
            },
            {
                path: 'classes',//班级管理
                name: 'classes',
                component: classes
            },
            {
                path: 'user/auditRegister',//审核注册
                name: 'userAuditRegister',
                component: auditRegister
            },
            {
                path: 'courseGroup/batchImport', // 批量导入
                name: 'courseGroupBatchImport',
                component: courseGroupBatchImport
            },
            // {
            //     path: 'courseGroup/auditJoin', //审核加入
            //     name: 'courseGroupAuditJoin',
            //     component: auditJoin
            // },
            {
                path: 'course/batchImport',
                name: 'batchImport',
                component: batchImportOne
            },
            {
                path: 'courseGroup/courseGroup',//课程组列表
                name: 'coursegroup',
                component: coursegroup
            },
            {
                path: 'major',//专业管理
                name: 'major',
                component: major
            },
            {
                path: 'course/courseList',
                name: 'course',
                component: course
            },
            {
                path: 'user/notice',//用户通知
                name: 'userMajor',
                component: notice
            },
            {
                path: 'user/stulist',//学生列表
                name: 'userStulist',
                component: stulist
            },
            {
                path: 'user/teacherList',//老师列表
                name: 'teacherList',
                component: teacherList
            }
        ]
    },

]

const router = new VueRouter({
    routes,
    mode:'history'
})

export default router
